package com.kuang.pojo;

public class User {
    private String name;

    /*默认使用无参构造，不然会报错
    public User(){
        System.out.println("默认的构造方法！");
    }*/

    //有参构造
    public User(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void show(){
        System.out.println("name="+name);
    }
}
